﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BlogsAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Blog.BlogsAdmin" %>
<owc:OwGrid ID="BlogsAdmingv" runat="server" SkinID="OwGridAdmin" AutoGenerateColumns="False"
    CellSpacing="0" DataSourceID="BlogsAdminOds" GridLines="None" OwEnableMessageDisplay="True"
    OwMessageDisplayType="InPlace" OwMessageDisplayControl="">
    <MasterTableView DataSourceID="BlogsAdminOds" DataKeyNames="BlogID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("BlogID") %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b><i>
                                    <%# Eval("Title")%></i>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <asp:Literal ID="LanguageLabel" runat="server" Text="<%$ OwR: Language%>" />:
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="CategoryLabelOwR" runat="server" OwText="CategoryLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwCategoriesBLL.OwGetEntity((long?)Eval("CategoryID")).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="PortalLabelOwR" runat="server" OwText="PortalLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Micronet.OpenWeb.Com.BLL.OwPortalsBLL.OwGetEntity((long?)Eval("PortalID")).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="NetworkLabelOwR" runat="server" OwText="NetworkLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Micronet.OpenWeb.Com.BLL.OwPortalsBLL.OwGetEntity((long?)Eval("NetworkID")).Name%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <owc:OwR ID="AllowSendPingbackTrackbackOwR" runat="server" OwText="AllowSendPingbackTrackback"
                                    OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="AllowSendPingbackTrackbackCbb" runat="server" AutoPostBack="true"
                                    Checked='<%#Eval("AllowSendPingbackTrackback")%>' CssClass="HiddenText" Text='<%#Eval("BlogID")%>'
                                    OnCheckedChanged="AllowSendPingbackTrackbackCbb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="AllowReceivePingbackTrackbackOwR" runat="server" OwText="AllowReceivePingbackTrackback"
                                    OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="AllowReceivePingbackTrackbackCbb" runat="server" Checked='<%#Eval("AllowReceivePingbackTrackback")%>'
                                    CssClass="HiddenText" Text='<%#Eval("BlogID")%>' AutoPostBack="true" OnCheckedChanged="AllowReceivePingbackTrackbackCbb_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="IsDeletedOwR" runat="server" OwText="IsDeleted" Text='<%#Eval("BlogID")%>' />
                            </td>
                            <td>
                                <owc:OwCheckBox runat="server" ID="IsDeletedChk" Checked='<%# Bind("IsDeleted") %>'
                                    OnCheckedChanged="IsDeletedChk_CheckedChanged" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                HeaderText="<%$OwR:Modify%>" UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/BlogsEdit.aspx?ID=<%#Eval("BlogID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" alt="" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$OwR:Deleted %>">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("BlogsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="BlogsAdminOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwBlogsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwBlogsBLL"
    UpdateMethod="OwUpdate" SelectCountMethod="OwGetByDynamicCount" 
    EnablePaging="True">
    <DeleteParameters>
        <asp:Parameter Name="blogID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter Name="networkID" Type="Int64" />
        <asp:Parameter Name="portalID" Type="Int64" />
        <asp:Parameter DbType="Guid" Name="userID" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="categoryID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="allowSendPingbackTrackback" Type="Boolean" />
        <asp:Parameter Name="allowReceivePingbackTrackback" Type="Boolean" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
